package com.zspace.lwq.boot.consumer.controller;

import com.zspace.lwq.boot.consumer.service.OrderService;
import com.zspace.lwq.user.bean.UserAddress;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping(value = "/user/list")
    public List<UserAddress> list(String id) {
        List<UserAddress> userAddresses = orderService.initOrder(id);
        return userAddresses;
    }
}
